home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
os2
/
adialin1.zip
/
ADIALIN
/
REESTAB.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-05-24
|
2KB
|
53 lines
/************************************************************************/
/* */
/* Re-Establish Routing for muliple PPP interfaces */
/* */
/* (C) 03.04.96, Axel Mueller */
/* amueller@stargate.rz.fh-offenburg.de */
/************************************************************************/
parse arg ModemIndex
/* Path setup */
LogPath = value('ONLINELOGDIR',,'OS2ENVIRONMENT')
NetstatLOG = LogPath'\netstat'ModemIndex'.log'
ReEstabLog = LogPath'\reestab'ModemIndex'.log'
call SysSleep 5
/* forget 2 lines above the routing table */
Line = linein(NetstatLOG)
Line = linein(NetstatLOG)
PPPFound = False
Ende = False
do while Ende = False
Line = linein(NetstatLOG)
if length(Line) > 0 then
do
parse value Line with Destination Router RefCnt IPCnt Flags Metric Interface
Interface = strip(Interface)
Destination = strip(Destination)
Router = strip(Router)
if substr(Interface, 1, 3) == "ppp" then
do
PPPFound = True
'ifconfig 'Interface' 'Router' 'Destination
LogString = 'ifconfig 'Interface' 'Router' 'Destination
rc = lineout( ReEstabLog, date(european)'-'time(normal)' 'LogString)
end
end
else
Ende = True
end
if PPPFound = False then
do
LogString = 'No PPP interfaces found'
rc = lineout( ReEstabLog, date(european)'-'time(normal)' 'LogString)
end
'exit'